home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / business / nonlin18.zip / MINFUEL.NLR < prev    next >
Text File  |  1992-08-08  |  841b  |  16 lines

  1. !
  2. !  Compute how long to fire horizontal thrusters so that the total fuel
  3. !  consumed is minimized.  The minimum value of the function is the total
  4. !  amount of fuel that will be used.  The 'time' parameter is the length
  5. !  of time that the horizontal thruster should be fired (in seconds).
  6. !
  7. Title Compute fire time for thruster to minimize total fuel consumption
  8. Register        ! Please register your use of Nonlin
  9. Constant G=1.67        ! Gravitational acceleration on moon (meters/sec^2)
  10. Constant A=1.10        ! Acceleration from horizontal thruster (meters/sec^2)
  11. Constant burnrate=2.3    ! Kg/sec fuel burn rate to produce 1 G acceleration
  12. Constant dist=200    ! Horizontal distance to be moved (meters)
  13. Parameter time        ! Number of seconds to fire horizontal thruster
  14. Function burnrate*(2*time*A/G + 2*time + (dist - A*time^2)/(A*time))
  15. Data
  16.